// 缺陷接口定义
export interface Bug {
  id: number;
  code: string;
  title: string;
  description: string;
  type: '功能缺陷' | '性能缺陷' | '安全缺陷' | '界面缺陷' | '兼容性缺陷';
  severity: '低' | '中' | '高' | '紧急';
  priority: '低' | '中' | '高' | '紧急';
  status: '新建' | '已分配' | '处理中' | '待验证' | '已解决' | '已关闭' | '已拒绝';
  project: string;
  assignee: string;
  reporter: string;
  environment: string;
  steps: string;
  expectedResult: string;
  actualResult: string;
  attachments: string[];
  relatedTask?: string;
  relatedRequirement?: string;
  createdAt: string;
  updatedAt: string;
  resolvedAt?: string;
  closedAt?: string;
}

// 缺陷API请求参数接口
export interface GetBugsParams {
  page?: number;
  pageSize?: number;
  search?: string;
  type?: string;
  project?: string;
  status?: string;
  severity?: string;
  priority?: string;
  assignee?: string;
}

// 缺陷统计接口
export interface BugStats {
  total: number;
  open: number;
  resolved: number;
  highSeverity: number;
  highPriority: number;
}

// 缺陷状态分布接口
export interface BugStatusDistribution {
  status: string;
  count: number;
  color: string;
}

// 缺陷严重程度分布接口
export interface BugSeverityDistribution {
  severity: string;
  count: number;
  color: string;
}